package com.ksd.api.beans;

import com.ksd.web.controller.tool.JSONUtil;
import lombok.Data;

import java.util.List;

@Data
public class GetMovieCategoryResponse {
    private Integer code;
    private String msg;
    private List<TvTypeResponse> data;


    public String setError(Integer code, String msg) {
        GetMovieCategoryResponse response = new GetMovieCategoryResponse();
        response.setCode(code);
        response.setMsg(msg);

        return JSONUtil.objectToStr(response);
    }

    public String setSuccess(List<TvTypeResponse> data) {
        GetMovieCategoryResponse response = new GetMovieCategoryResponse();
        response.setCode(200);
        response.setMsg("操作成功");
        response.setData(data);

        return JSONUtil.objectToStr(response);
    }

}
